<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>lcboparse.lcboParse</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/beerwatch/">beerwatch</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="lcboparse-module.html">Module&nbsp;lcboparse</a> ::
        Class&nbsp;lcboParse
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="lcboparse.lcboParse-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class lcboParse</h1><p class="nomargin-top"><span class="codelink"><a href="lcboparse-pysrc.html#lcboParse">source&nbsp;code</a></span></p>
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">lcboParse</strong>
</pre>

<hr />
<p>Parses the lcbo's website grabbing information about each item 
  available for sale.</p>

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="lcboparse.lcboParse-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">path</span>,
        <span class="summary-sig-arg">pickle</span>=<span class="summary-sig-default">False</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="lcboparse-pysrc.html#lcboParse.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="getItems"></a><span class="summary-sig-name">getItems</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Parse the items found on the lcbo website</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="lcboparse-pysrc.html#lcboParse.getItems">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">string</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="lcboparse.lcboParse-class.html#nextPage" class="summary-sig-name">nextPage</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">pageNo</span>)</span><br />
      Issue a post for the next page</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="lcboparse-pysrc.html#lcboParse.nextPage">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">string list</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="lcboparse.lcboParse-class.html#parseItems" class="summary-sig-name">parseItems</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">contents</span>)</span><br />
      Parse the item id numbers from the search result page and return them
      in a list</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="lcboparse-pysrc.html#lcboParse.parseItems">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="lcboparse.lcboParse-class.html#parseProduct" class="summary-sig-name">parseProduct</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">items</span>)</span><br />
      Parse information about a single lcbo item.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="lcboparse-pysrc.html#lcboParse.parseProduct">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="lcboparse.lcboParse-class.html#parseField" class="summary-sig-name">parseField</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">regex</span>,
        <span class="summary-sig-arg">contents</span>,
        <span class="summary-sig-arg">group</span>,
        <span class="summary-sig-arg">item</span>)</span><br />
      Parse information for a single field.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="lcboparse-pysrc.html#lcboParse.parseField">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="addItem"></a><span class="summary-sig-name">addItem</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">pTitle</span>,
        <span class="summary-sig-arg">pQuantity</span>,
        <span class="summary-sig-arg">pPrice</span>,
        <span class="summary-sig-arg">pCategory</span>,
        <span class="summary-sig-arg">pPercent</span>,
        <span class="summary-sig-arg">pGeography</span>,
        <span class="summary-sig-arg">pBrewer</span>)</span><br />
      Add an item to the current collection of lcbo items</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="lcboparse-pysrc.html#lcboParse.addItem">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="dumpItems"></a><span class="summary-sig-name">dumpItems</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Pickle the lcbo items</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="lcboparse-pysrc.html#lcboParse.dumpItems">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="writeToSQL"></a><span class="summary-sig-name">writeToSQL</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Write the items to an sqlite3 database</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="lcboparse-pysrc.html#lcboParse.writeToSQL">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="logDebug"></a><span class="summary-sig-name">logDebug</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">error</span>)</span><br />
      Log an error message</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="lcboparse-pysrc.html#lcboParse.logDebug">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">string</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="lcboparse.lcboParse-class.html#openUrl" class="summary-sig-name">openUrl</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">link</span>,
        <span class="summary-sig-arg">method</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">GET</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">post</span>=<span class="summary-sig-default">None</span>)</span><br />
      Open and return the contents of a URL.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="lcboparse-pysrc.html#lcboParse.openUrl">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="cleanUp"></a><span class="summary-sig-name">cleanUp</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Closes the connection to the server if it is currently active</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="lcboparse-pysrc.html#lcboParse.cleanUp">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== INSTANCE VARIABLES ==================== -->
<a name="section-InstanceVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="url"></a><span class="summary-name">url</span><br />
      url of the lcbo's webiste
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="lcboparse.lcboParse-class.html#searchLink" class="summary-name">searchLink</a><br />
      This is the path where items are displayed.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="productLink"></a><span class="summary-name">productLink</span><br />
      Not used??
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="lcboparse.lcboParse-class.html#printerLink" class="summary-name">printerLink</a><br />
      This is the link for a product's printer friendly information page.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="post"></a><span class="summary-name">post</span><br />
      The post command issued so we can access the next 100 items off the 
      search link defined above
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="connection"></a><span class="summary-name">connection</span><br />
      the active connection if any
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="debug"></a><span class="summary-name">debug</span><br />
      debug mode
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="itemObjs"></a><span class="summary-name">itemObjs</span><br />
      a collection of the parsed items.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="lcboparse.lcboParse-class.html#pickler" class="summary-name">pickler</a><br />
      An lcboItemPickler.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="lcboparse.lcboParse-class.html#sql" class="summary-name">sql</a><br />
      An sqloader object.
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">path</span>,
        <span class="sig-arg">pickle</span>=<span class="sig-default">False</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="lcboparse-pysrc.html#lcboParse.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature</p>
  <dl class="fields">
    <dt>Overrides:
        object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="nextPage"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">nextPage</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">pageNo</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="lcboparse-pysrc.html#lcboParse.nextPage">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Issue a post for the next page</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>pageNo</code></strong> (int) - The page number signifies which page of results out of all total 
          possible results we are currently looking at.</li>
    </ul></dd>
    <dt>Returns: string</dt>
        <dd>the html contents of the current page of results we are on 
          (pageNo being the page)</dd>
  </dl>
</td></tr></table>
</div>
<a name="parseItems"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">parseItems</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">contents</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="lcboparse-pysrc.html#lcboParse.parseItems">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Parse the item id numbers from the search result page and return them 
  in a list</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>contents</code></strong> (string) - An html page listing lcbo items. This page is the result of 
          issuing a post command on the search link self.searchLink</li>
    </ul></dd>
    <dt>Returns: string list</dt>
        <dd>a list of parsed item id numbers.</dd>
  </dl>
</td></tr></table>
</div>
<a name="parseProduct"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">parseProduct</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">items</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="lcboparse-pysrc.html#lcboParse.parseProduct">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Parse information about a single lcbo item. Create a new lcbo item 
  from the information parsed from an item's 'printer friendly' link.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>items</code></strong> (string list) - a list of id numbers where when an individual id number is 
          combined with the self.printerLink it yields us the printer 
          friendly for that item.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="parseField"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">parseField</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">regex</span>,
        <span class="sig-arg">contents</span>,
        <span class="sig-arg">group</span>,
        <span class="sig-arg">item</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="lcboparse-pysrc.html#lcboParse.parseField">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Parse information for a single field. Use the passed in regular 
  expression to parse information for a particular field from an item's 
  'printer friendly' page.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>regex</code></strong> (compiled regular expression) - A compiled regular expression for a particular field.</li>
        <li><strong class="pname"><code>contents</code></strong> (string) - An html page with info about a single item which will be parsed 
          by the regular expression.</li>
        <li><strong class="pname"><code>group</code></strong> (string) - A regular expression group name, usually related in some way to 
          the regular expression. i.e 'title' gives us parsed title 
          information when the regex is a compiled title regex.</li>
        <li><strong class="pname"><code>item</code></strong> (string) - Id number of the item we are parsing. Used for debugging.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="openUrl"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">openUrl</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">link</span>,
        <span class="sig-arg">method</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">GET</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">post</span>=<span class="sig-default">None</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="lcboparse-pysrc.html#lcboParse.openUrl">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Open and return the contents of a URL.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>link</code></strong> (string) - The url to be opened.</li>
        <li><strong class="pname"><code>method</code></strong> (string) - The method of retrieval, post or get.</li>
        <li><strong class="pname"><code>post</code></strong> (string of key value pairs. i.e STOCK=GREAT&amp;MORE=BETTER) - post data used iff the method is a get.</li>
    </ul></dd>
    <dt>Returns: string</dt>
        <dd>the html contents of the opened URL.</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== INSTANCE VARIABLE DETAILS ==================== -->
<a name="section-InstanceVariableDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Variable Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceVariableDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="searchLink"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">searchLink</h3>
  <p>This is the path where items are displayed. In order to progress to 
  the next page and list the next x items a post command must be issued. 
  The items on this page are parsed for relevant information.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="printerLink"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">printerLink</h3>
  <p>This is the link for a product's printer friendly information page. 
  The products information is parsed from this page.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="pickler"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">pickler</h3>
  <p>An lcboItemPickler. Used instead of writing the results to an sqlite3 
  database</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="sql"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">sql</h3>
  <p>An sqloader object. Used to write the results to an sql3 file</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/beerwatch/">beerwatch</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Sun Sep 26 19:00:21 2010
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
